<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
    response.setHeader("Cache-Control", "no-store");
    response.setHeader("Pragrma", "no-cache");
    response.setDateHeader("Expires", 0);
    String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Login</title>
</head>
<body>
    <s:if test="hasFieldErrors()">
        <s:iterator value="fieldErrors">
            <font color=red><s:property value="value[0]" /></font><br>
        </s:iterator>
    </s:if>
    <form action="<%=path%>/helloworld1.do" method="post">
        属性驱动(FieldDirven)1-基本数据类型的属性对应<br>
        <input type="hidden" name="submitFlag" value="login" />
        账号：<input type="text" name="account" /><br>
        密码：<input type="password" name="password" /><br>
        <input type="checkbox" name="habits" value="sports" />运动
        <input type="checkbox" name="habits" value="reading" />读书
        <input type="checkbox" name="habits" value="sleep" />睡觉<br>
        <input type="submit" value="提交"/>
    </form>
    <form action="<%=path%>/helloworld2.do" method="post">
        属性驱动(FieldDirven)2-直接使用域对象<br>
        <input type="hidden" name="hwm.submitFlag" value="login" />
        账号：<input type="text" name="hwm.account" /><br>
        密码：<input type="password" name="hwm.password" /><br>
        <input type="submit" value="提交"/>
    </form>
    <form action="<%=path%>/helloworld3.do" method="post">
        模型驱动(ModelDriven)<br>
        <input type="hidden" name="submitFlag" value="login" />
        账号：<input type="text" name="account" /><br>
        密码：<input type="password" name="password" /><br>
        <input type="submit" value="提交"/>
    </form>
    <s:text name="labela"></s:text>
</body>
</html>